put "Do you want to export your data to a text file before quitting HyperCard?" into promptStr
ShowDialog 1,3758,promptStr,TRUE
if the result = 1 then
put "You clicked on the ΓÇ£YESΓÇ¥ button!" into cd fld "theResult"
else if the result = 2 then
put "You clicked on the ΓÇ£CANCELΓÇ¥ button!" into cd fld "theResult"
else if the result = 3 then
put "You clicked on the ΓÇ£NOΓÇ¥ button!" into cd fld "theResult"
end if
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=265 top=189 right=212 bottom=382
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Alert Type
----- HyperTalk script -----
on mouseUp
beep 1
ShowDialog 1,3757,"Do you really want to delete all cards in this stack?",TRUE
if the result = 1 then
put "You clicked on the ΓÇ£OKΓÇ¥ button!" into cd fld "theResult"
else put "You clicked on the ΓÇ£CANCELΓÇ¥ button!" into cd fld "theResult"
end mouseUp
-- part 3 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=5 top=278 right=302 bottom=505
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: theResult
-- part contents for background part 3
----- text -----
ShowDialog XCMD Type 1 (continued...)
-- part contents for background part 1
----- text -----
For alert boxes, you should precede your call to the external with "beep 1." It is a Macintosh convention that alerts beep when they are displayed on the screen.
The item number clicked on will be returned in "the result". This is only true for ENABLED item numbers.